home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
CSound
/
convert-to-csound
next >
Wrap
Lisp/Scheme
|
1998-10-25
|
801b
|
38 lines
convert-to-csound length-pattern
converts ordinary length-patterns (ratios or ticks) into seconds in real-time
for use with csound
outputs two lists where the first is the attacks and the second is the lengths.
here is a bogus-example on how it could be used:
(depending on what the csound orchestra-file looks like)
(setq rhy (symbol-trim 34 '(1/4 1/4 -1/4 1/4 1/4 -1/8 1/2 1/16 1/16)))
(setq strt (car (convert-to-csound rhy)))
(setq len (cadr (convert-to-csound rhy)))
(setq l (length len))
(setq ampl (let ((result nil))
(dotimes (i l)
(push (get-random 1000 8000) result))
result))
(setq ptch (let ((result nil))
(dotimes (i l)
(push (get-random 100 500) result))
result))
(print-csound
"ccl:test.sco"
'((f1 0 4096 10 1 0.5 0.1))
'i1
:overwrite
t
strt len ampl ptch)